#include "subsettreenode.h"
#include <iostream>
using namespace std;
SubSetTreeNode::SubSetTreeNode()
{

    this->subset = NULL;
    this->bsid = -1;
    deviceId = -1;
    this->isSub = false;
    group = NULL;
}
SubSetTreeNode::~SubSetTreeNode()
{

    if (this->subset != NULL)
    {
        delete this->subset;
    }
    this->bsid = -1;
    this->subset = NULL;
    if (this->group != NULL)
    {
        delete group;
    }
    this->group = NULL;
}

SubSetTreeNode::SubSetTreeNode(QTreeWidgetItem *other): QTreeWidgetItem(other)
{
    this->isSub = false;
    this->subset = NULL;
    this->bsid = -1;
    deviceId = -1;
    group = NULL;

}
SubSetTreeNode::SubSetTreeNode(QTreeWidget *tree): QTreeWidgetItem(tree)
{

    this->subset = NULL;
    this->bsid = -1;
    deviceId = -1;
    this->isSub = false;
    group = NULL;
}

void SubSetTreeNode::setType(DeviceType   type)
{
    this->type = type;
}
DeviceType   SubSetTreeNode::getType()
{
    return this->type;
}

void SubSetTreeNode::setSubset(SubSet *sebset)
{
    this->subset = sebset;
}
SubSet *SubSetTreeNode::getSubset()
{
    return this->subset;
}
void SubSetTreeNode::showNode()
{

}
void SubSetTreeNode::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column)
{

}
void SubSetTreeNode::setDeviceTypeId(int deviceTypeId)
{
    this->deviceTypeId = deviceTypeId;
}

int SubSetTreeNode::getDeviceTypeId()
{
    return this->deviceTypeId;
}
int SubSetTreeNode::getBsid()
{
    return this->bsid;
}
void SubSetTreeNode::setBsid(int bsid)
{
    this->bsid = bsid;
}
void SubSetTreeNode::setDeviceId(int deviceId)
{
    this->deviceId = deviceId;
}

int SubSetTreeNode::getDeviceId()
{
    return this->deviceId;
}
